<?php
require_once('MainModel.php');

/**
 * Add your description here
 *
 * @author Anh euro
 * @copyright Hipt Group
 * @license http://framework.zend.com/license/new-bsd     New BSD License
 */
 
class Vina_Model_Regiseter extends MainModel
{

    /**
     * mysql var type int(11)
     *
     * @var int     
     */
    protected $_Id;
    
    /**
     * mysql var type varchar(255)
     *
     * @var string     
     */
    protected $_Name;
    
    /**
     * mysql var type varchar(255)
     *
     * @var string     
     */
    protected $_Birthday;
    
    /**
     * mysql var type varchar(255)
     *
     * @var string     
     */
    protected $_Noisinh;
    
    /**
     * mysql var type varchar(255)
     *
     * @var string     
     */
    protected $_Job;
    
    /**
     * mysql var type varchar(255)
     *
     * @var string     
     */
    protected $_CompanyName;
    
    /**
     * mysql var type varchar(255)
     *
     * @var string     
     */
    protected $_Address;
    
    /**
     * mysql var type varchar(255)
     *
     * @var string     
     */
    protected $_City;
    
    /**
     * mysql var type varchar(255)
     *
     * @var string     
     */
    protected $_Email;
    
    /**
     * mysql var type varchar(255)
     *
     * @var string     
     */
    protected $_Phone;
    
    /**
     * mysql var type varchar(255)
     *
     * @var string     
     */
    protected $_Website;
    
    /**
     * mysql var type varchar(255)
     *
     * @var string     
     */
    protected $_ClassName;
    
    /**
     * mysql var type varchar(255)
     *
     * @var string     
     */
    protected $_ClassWhere;
    
    /**
     * mysql var type varchar(255)
     *
     * @var string     
     */
    protected $_Content;
    
    /**
     * mysql var type int(11)
     *
     * @var int     
     */
    protected $_Time;
    

    

function __construct() {
    $this->setColumnsList(array(
    'id'=>'Id',
    'name'=>'Name',
    'birthday'=>'Birthday',
    'noisinh'=>'Noisinh',
    'job'=>'Job',
    'company_name'=>'CompanyName',
    'address'=>'Address',
    'city'=>'City',
    'email'=>'Email',
    'phone'=>'Phone',
    'website'=>'Website',
    'class_name'=>'ClassName',
    'class_where'=>'ClassWhere',
    'content'=>'Content',
    'time'=>'Time',
    ));
}

	
    
    /**
     * sets column id type int(11)     
     *
     * @param int $data
     * @return Vina_Model_Regiseter     
     *
     **/

    public function setId($data)
    {
        $this->_Id=$data;
        return $this;
    }

    /**
     * gets column id type int(11)
     * @return int     
     */
     
    public function getId()
    {
        return $this->_Id;
    }
    
    /**
     * sets column name type varchar(255)     
     *
     * @param string $data
     * @return Vina_Model_Regiseter     
     *
     **/

    public function setName($data)
    {
        $this->_Name=$data;
        return $this;
    }

    /**
     * gets column name type varchar(255)
     * @return string     
     */
     
    public function getName()
    {
        return $this->_Name;
    }
    
    /**
     * sets column birthday type varchar(255)     
     *
     * @param string $data
     * @return Vina_Model_Regiseter     
     *
     **/

    public function setBirthday($data)
    {
        $this->_Birthday=$data;
        return $this;
    }

    /**
     * gets column birthday type varchar(255)
     * @return string     
     */
     
    public function getBirthday()
    {
        return $this->_Birthday;
    }
    
    /**
     * sets column noisinh type varchar(255)     
     *
     * @param string $data
     * @return Vina_Model_Regiseter     
     *
     **/

    public function setNoisinh($data)
    {
        $this->_Noisinh=$data;
        return $this;
    }

    /**
     * gets column noisinh type varchar(255)
     * @return string     
     */
     
    public function getNoisinh()
    {
        return $this->_Noisinh;
    }
    
    /**
     * sets column job type varchar(255)     
     *
     * @param string $data
     * @return Vina_Model_Regiseter     
     *
     **/

    public function setJob($data)
    {
        $this->_Job=$data;
        return $this;
    }

    /**
     * gets column job type varchar(255)
     * @return string     
     */
     
    public function getJob()
    {
        return $this->_Job;
    }
    
    /**
     * sets column company_name type varchar(255)     
     *
     * @param string $data
     * @return Vina_Model_Regiseter     
     *
     **/

    public function setCompanyName($data)
    {
        $this->_CompanyName=$data;
        return $this;
    }

    /**
     * gets column company_name type varchar(255)
     * @return string     
     */
     
    public function getCompanyName()
    {
        return $this->_CompanyName;
    }
    
    /**
     * sets column address type varchar(255)     
     *
     * @param string $data
     * @return Vina_Model_Regiseter     
     *
     **/

    public function setAddress($data)
    {
        $this->_Address=$data;
        return $this;
    }

    /**
     * gets column address type varchar(255)
     * @return string     
     */
     
    public function getAddress()
    {
        return $this->_Address;
    }
    
    /**
     * sets column city type varchar(255)     
     *
     * @param string $data
     * @return Vina_Model_Regiseter     
     *
     **/

    public function setCity($data)
    {
        $this->_City=$data;
        return $this;
    }

    /**
     * gets column city type varchar(255)
     * @return string     
     */
     
    public function getCity()
    {
        return $this->_City;
    }
    
    /**
     * sets column email type varchar(255)     
     *
     * @param string $data
     * @return Vina_Model_Regiseter     
     *
     **/

    public function setEmail($data)
    {
        $this->_Email=$data;
        return $this;
    }

    /**
     * gets column email type varchar(255)
     * @return string     
     */
     
    public function getEmail()
    {
        return $this->_Email;
    }
    
    /**
     * sets column phone type varchar(255)     
     *
     * @param string $data
     * @return Vina_Model_Regiseter     
     *
     **/

    public function setPhone($data)
    {
        $this->_Phone=$data;
        return $this;
    }

    /**
     * gets column phone type varchar(255)
     * @return string     
     */
     
    public function getPhone()
    {
        return $this->_Phone;
    }
    
    /**
     * sets column website type varchar(255)     
     *
     * @param string $data
     * @return Vina_Model_Regiseter     
     *
     **/

    public function setWebsite($data)
    {
        $this->_Website=$data;
        return $this;
    }

    /**
     * gets column website type varchar(255)
     * @return string     
     */
     
    public function getWebsite()
    {
        return $this->_Website;
    }
    
    /**
     * sets column class_name type varchar(255)     
     *
     * @param string $data
     * @return Vina_Model_Regiseter     
     *
     **/

    public function setClassName($data)
    {
        $this->_ClassName=$data;
        return $this;
    }

    /**
     * gets column class_name type varchar(255)
     * @return string     
     */
     
    public function getClassName()
    {
        return $this->_ClassName;
    }
    
    /**
     * sets column class_where type varchar(255)     
     *
     * @param string $data
     * @return Vina_Model_Regiseter     
     *
     **/

    public function setClassWhere($data)
    {
        $this->_ClassWhere=$data;
        return $this;
    }

    /**
     * gets column class_where type varchar(255)
     * @return string     
     */
     
    public function getClassWhere()
    {
        return $this->_ClassWhere;
    }
    
    /**
     * sets column content type varchar(255)     
     *
     * @param string $data
     * @return Vina_Model_Regiseter     
     *
     **/

    public function setContent($data)
    {
        $this->_Content=$data;
        return $this;
    }

    /**
     * gets column content type varchar(255)
     * @return string     
     */
     
    public function getContent()
    {
        return $this->_Content;
    }
    
    /**
     * sets column time type int(11)     
     *
     * @param int $data
     * @return Vina_Model_Regiseter     
     *
     **/

    public function setTime($data)
    {
        $this->_Time=$data;
        return $this;
    }

    /**
     * gets column time type int(11)
     * @return int     
     */
     
    public function getTime()
    {
        return $this->_Time;
    }
    
    /**
     * returns the mapper class
     *
     * @return Vina_Model_RegiseterMapper
     *
     */

    public function getMapper()
    {
        if (null === $this->_mapper) {
            $this->setMapper(new Vina_Model_RegiseterMapper());
        }
        return $this->_mapper;
    }


    /**
     * deletes current row by deleting a row that matches the primary key
     * 
     * @return int
     */

    public function deleteRowByPrimaryKey()
    {
        if (!$this->getId())
            throw new Exception('Primary Key does not contain a value');
        return $this->getMapper()->getDbTable()->delete('id = '.$this->getId());
    }

}

